package model;

import model.Interface.IeventProperties;
import Enums.EventType;

public class MovieEvent implements Comparable{

	public long startTime;
	public long endTime;
	public EventType type;
	public IeventProperties properties;
	public Result[] resultYes;
	public Result[] resultNo;
	public int id;
	public Boolean isResultYes;

	public MovieEvent(int id, long startTime, long endTime, EventType type,
			IeventProperties properties, Result[] resultYes, Result[] resultNo) {
		super();
		this.id = id;
		this.startTime = startTime;
		this.endTime = endTime;
		this.type = type;
		this.properties = properties;
		this.resultYes = resultYes;
		this.resultNo = resultNo;
		this.isResultYes = false;

	}

	public MovieEvent(int id, EventType type,
			IeventProperties properties){
		this.id = id;
		this.type = type;
		this.properties = properties;
		this.isResultYes = false;
	}

	public int getId() {
		return id;
	}

	public Boolean getIsResultYes() {
		return isResultYes;
	}

	public void setIsResultYes(Boolean isResultYes) {
		this.isResultYes = isResultYes;
	}

	public void setId(int id) {
		this.id = id;
	}

	public IeventProperties getProperties() {
		return properties;
	}

	public void setProperties(IeventProperties properties) {
		this.properties = properties;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getEndTime() {
		return endTime;
	}

	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}

	public EventType getType() {
		return type;
	}

	public void setType(EventType type) {
		this.type = type;
	}

	public Result[] getResultYes() {
		return resultYes;
	}

	public void setResultYes(Result[] resultYes) {
		this.resultYes = resultYes;
	}

	public Result[] getResultNo() {
		return resultNo;
	}

	public void setResultNo(Result[] resultNo) {
		this.resultNo = resultNo;
	}

	@Override
	public int compareTo(Object another) {
		Integer myID = id;
		Integer anotherId = ((MovieEvent)another).id;
		return myID.compareTo(anotherId);
	}

}
